﻿<%@ Page Language="C#" MasterPageFile="~/Admin/SiteAdmin.Master" AutoEventWireup="true" CodeBehind="QuanLyAnhQC.aspx.cs" Inherits="DM.Web.Admin.QuanLyAnhQC" Title="Công ty cổ phần Đường Man - Duong Malt JSC" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>Quản lý ảnh quảng cáo</h1>
    <asp:DataList ID="DataList1" runat="server" OnItemDataBound="DataList1_ItemDataBound">
        <ItemTemplate>
        <asp:Label ID="LabelFileExtention" runat="server" ToolTip='<%#Eval("Name" )%>' Text='<%#Eval("urlImage").ToString().Substring((Eval("urlImage").ToString().Length)-3,3) %>' Visible="false"></asp:Label>
        <asp:Label ID="urlImage" runat="server" Text='<%#Eval("urlImage") %>' Visible="false"></asp:Label>
        <asp:Panel id="labelImage" runat="server">
            <table style="width:625px" border="1">
                <tr>
                    <td colspan="1" rowspan="4" style="width: 260px" align="center">
                    <a href='<%#Eval("Link") %>'><img height="100" style="margin:auto" src='<%#Eval("urlImage")%>'alt="" /></a>
                    </td>                        
                    <td>                        
                        <asp:Button ID="buttonChangeLink" runat="server" Text="Change Link" Width="100px" OnClick="buttonChangeLink_Click"/>
                        <asp:TextBox ID="textBoxLink" runat="server" Text='<%#Eval("Link") %>' Width="223px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="buttonDelete" runat="server" Text="Delete" Width="100px" OnClick="buttonDelete_Click"/></td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="buttonUp" runat="server" Text="Up" Width="100px" OnClick="buttonUp_Click"/></td>
                </tr>
                <tr>
                    <td>
                    <asp:Button ID="buttonDown" runat="server" Text="Down" Width="100px" OnClick="buttonDown_Click" /></td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel id="labelFlash" runat="server">
            <table style="width:625px" border="1">
                <tr>
                    <td colspan="1" rowspan="4" width="260" align="center">
                    <object height="100" style="margin:auto;"><param name="movie" value='<%#Eval("urlImage") %>'><embed src='<%#Eval("urlImage") %>' height="100px"></embed></object></td>                        
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="button2" runat="server" Text="Delete" Width="100px" OnClick="buttonDelete_Click"/></td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="button3" runat="server" Text="Up" Width="100px"/></td>
                </tr>
                <tr>
                    <td>
                    <asp:Button ID="button4" runat="server" Text="Down" Width="100px" /></td>
                </tr>
            </table>
        </asp:Panel>
            
        </ItemTemplate>
    </asp:DataList>
    <asp:Panel ID="PanelUpload" runat="server" Width="100%">
        <h4>Upload quảng cáo</h4>
        <table style="width: 625px">
            <tr>
                <td>
                    <asp:FileUpload ID="FileUpload" runat="server"  Width="513px" Height="25px" /></td>
                <td>
                    <asp:Button ID="ButtonUpload" runat="server" Text="Upload" Width="100px" OnClick="ButtonUpload_Click" /></td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
